package com.cskaoyan.utils;

import com.cskaoyan.bean.vo.BaseRespVo;

public class BaseRespVoUtil {
    public static BaseRespVo respByAffectedRow(int affectedRow){
        if(affectedRow == 1){
            return BaseRespVo.ok();
        } else {
            return BaseRespVo.fail("未知错误，请重试");
        }
    }

    public static BaseRespVo respByConstantCode(int code,String msg) {
        if (code == Constant.FAIL) {
            return BaseRespVo.fail(msg);
        }
        return BaseRespVo.ok();
    }
}
